package com.sh.data.engine.domain.normalization.model.model.domain;

import lombok.Data;

import java.util.List;

/**
 * @author : fuchen
 * @date : 2022/1/7 11:53
 */
@Data
public class DimTableDomain {

    //    @Min(value = 1)
//  @ApiModelProperty(value = "表id")
    private Long tableId;

    /**
     * 只在查询时赋值，不做存储
     */
//    @Size(max = 255)
//  @ApiModelProperty(value = "表名称")
    private String tableName;

    //    @Size(max = 255)
//  @ApiModelProperty(value = "表别名")
    private String tableAlias;

    /**
     * 只在查询时赋值，不做存储
     */
//    @Size(max = 255)
//  @ApiModelProperty(value = "表描述")
    private String tableComment;

    //  @ApiModelProperty(value = "字段集合")
    private List<Field> fields;

    @Data
//  @ApiModel
    public static class Field {

        //        @Size(max = 255)
//    @ApiModelProperty(value = "字段名称")
        private String fieldName;

        //        @Size(max = 255)
//    @ApiModelProperty(value = "字段类型")
        private String fieldType;

        //        @Size(max = 255)
//    @ApiModelProperty(value = "字段描述")
        private String fieldComment;

        /**
         * 是否是外键字段
         */
//    @ApiModelProperty(value = "是否是外键字段")
        private Boolean isForeignField = false;

        //    @ApiModelProperty(value = "顺序")
        private Integer idx;

        //    @ApiModelProperty(value = "字段别名")
        private String alias;

        //    @ApiModelProperty(value = "描述")
        private String aliasComment;
    }
}
